Alerts Maintenance Cmdlets

The following are lists of the commands to delete alerts from the database.

Arguments in bold are mandatory.

Invoke-AmcRemoveOrphanedAlerts

Deletes all alerts which do not have any associated events.

Return value: Void

Arguments Argument Description
BatchSize (Int) Number of rows to be affected within each batch transaction.
BatchDelay (Int) Amount of time in seconds that SQL will pause to allow other transactions to process.

Test-AmcRemoveOrphanedAlerts

Provides preview results of the Invoke-AmcRemoveAllOrphanedAlerts web method - the number of alerts which do not have any associated events which would be deleted.

Return value: Void

Arguments Argument Description
BatchSize (Int) Number of rows to be affected within each batch transaction.

Each Test-<OperationName> command returns a PreviewDataSet object. This result contains the following information:

CountOfEventRows

CountOfEventDeprecatedRows

CountOfEventBatches

CountOfDeprecatedBatches

CountOfAlertRows

CountOfAlertBatches

TimeOfExecution (UTC)